package com.fh.shop.api.util;

public class ValidateUtil {

    public static boolean isPhone(String phone) {
        return phone.matches("^1(3|4|5|7|8)\\d{9}$");
    }

    public static boolean isMail(String mail) {
        return mail.matches("^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$");
    }
}
